package com.hxs.hxsserver.mapper.device;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hxs.hxsserver.domain.dto.IdDTO;
import com.hxs.hxsserver.domain.dto.device.*;
import com.hxs.hxsserver.domain.entity.device.AlarmRule;
import com.hxs.hxsserver.domain.entity.device.Device;
import com.hxs.hxsserver.domain.entity.device.Factor;
import com.hxs.hxsserver.domain.entity.user.User;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

/**
 * @author liuchuan
 * @create 2024/9/27
 */
@Repository
public interface FactorMapper  extends BaseMapper<Factor> {

    IPage<FactorDTO> getDeviceListByUserId(@Param("page") Page<Device> page,@Param("factorDTO") QueryFactorListDTO factorDTO);

    IPage<ReturnFactorHis> selectFactorHisByAddr(@Param("page") Page<ReturnFactorHis> page,@Param("queryFactorHisDTO") QueryFactorHisDTO queryFactorHisDTO);

    AlarmData getAlarmRule(@Param("addr")String addr, @Param("node")int node, @Param("sort")int sort);


    User getUser(@Param("addr")String addr);
}